//
//  main.cpp
//  MATH233_iLab3
//
//  Created by Ronald Ram on 1/27/13.
//  Copyright (c) 2013 Ronald Ram. All rights reserved.
//

#include <iostream>
#include <string>
using namespace std;

#include "RecurrenceRelations.h"


void WelcomeMsg();

int main(int argc, const char * argv[])
{
    //local vars
    bool canQuit = false; string shouldQuit = "";
    int input_1, input_2;
    
    RecurrenceRelations rr; //Instance of RR class

    WelcomeMsg();
    
    do
    {
        cout << "Enter a numeric value for A(0):  ";  cin >> input_1;
        cout << "Enter a numeric value for A(1):  ";  cin >> input_2;
        
        rr.setInput1(input_1); //capture input A0
        rr.setInput2(input_2); //Capture input A1
        rr.RR1();
        rr.RR2();
        rr.print();
        
        cout << "\nQuit Program Y/N ? ";  cin >> shouldQuit;
        canQuit = (shouldQuit == "Y" || shouldQuit == "y") ? true : false;
        if (canQuit) cout << "\nThank you - Good Bye!\n" << endl;
    }
    while ( !canQuit);
    
    return 0;
}


void WelcomeMsg()
{
    cout << endl;
    cout << "===================================================" << endl;
    cout << "Welcome to the Recurrence Relations Program" << endl;
    cout << "Class Assignment: MATH 233 - iLab 3" << endl;
    cout << "Author: Ronald Ram" << endl;
    cout << "===================================================" << endl << endl;
}